<!-- templates/results.html -->
{% extends "base.html" %}

{% block content %}
<h2>识别结果</h2>

{% if error %}
    <div class="error">
        <strong>错误:</strong> {{ error }}
    </div>
{% else %}
    <div>
        <h3>上传的图片:</h3>
        <img src="{{ image.image.url }}" alt="上传的图片" class="result-image">
    </div>

    <div>
        <h3>图像描述:</h3>
        <div class="description">{{ description }}</div>
    </div>
{% endif %}

<a href="{% url 'upload_image' %}" class="btn">上传另一张图片</a>
{% endblock %}